﻿using System;
using System.Collections.Generic;
using Gameplay.PVE.Utils;
using UnityEngine;
using XLua;
using Yoozoo.Framework.Core;

namespace Gameplay.PVE.Survivor
{
    public class BattleEnemyAIConfig
    {
        public int id;
        public float search_range;
        public int defaultState;
    }
    
    public partial class BattleConfigManager
    {
        private Dictionary<int, BattleEnemyAIConfig> enemyAIConfigMap;
        public BattleEnemyAIConfig GetEnemyAIConfig(int id)
        {
            if (enemyAIConfigMap.TryGetValue(id,out var config))
            {
                return config;
            }
            UnityEngine.Debug.LogError("AI配置找不到" + id);
            return null;
        }
        public static void PreloadEnemyAIConfig(LuaTable table)
        {
            PveUtils.PreloadRpgConfig(table,ref Instance.enemyAIConfigMap);
        }
    }
}
